Fix erroneous usage of height-for-width apis in gtk_widget_real_adjust_size_allocation().
authorTristan Van Berkom <tristan.van.berkom@gmail.com>
Mon, 27 Sep 2010 12:15:16 +0000 (21:15 +0900)
committerTristan Van Berkom <tristan.van.berkom@gmail.com>
Mon, 27 Sep 2010 12:15:16 +0000 (21:15 +0900)
commit7047502d846713fee8f271354c86afa5dd63ffdd
treebd7bc34ba083dffd353f3188898f18da3c708754
parentde0428fe520ea0be3c3c612054927d0b78faaa1b
Fix erroneous usage of height-for-width apis in gtk_widget_real_adjust_size_allocation().

When fitting a widget into its allocation, the second dimension
is always dependent on the first, so gtk_widget_get_preferred_size()
cannot be used directly (because we want the natural height for
the allocated width, not the natural height for the natural width,
which is generally a smaller height than the height-for-minimum-width
or height-for-allocated-width).

Added test to testadjustsize to ensure proper behaviour.
gtk/gtkwidget.c
tests/testadjustsize.c